﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BookStore.Platform.objects;

using BookStore.WebAnalyzer;

namespace BookStore.Platform.apis
{
    public interface IChapterApi 
    {
        void Save(Chapter chapter);

        Chapter GetByName(string chapterName, Guid bookId);

        Chapter GetChapterByUrl(string url,string chapterName, Guid bookId);

        IDictionary<string, string> GetChapterUrls(string url, string baseUrl);
    }
    public abstract class ChapterApi : IChapterApi
    {
        //private WebClient webClient = null;

        public IWebAnalyzerApi webAnalyzerApi = null;

        public ChapterApi(IWebAnalyzerApi webAnalyzerApi)//WebClient webClient
        {
           this.webAnalyzerApi = webAnalyzerApi;
        }
        #region IChapterApi Members

       

        #endregion

        #region

        #endregion

        #region IChapterApi Members

        public abstract void Save(Chapter chapter);
      

        public abstract Chapter GetByName(string chapterName, Guid bookId);


        public abstract Chapter GetChapterByUrl(string url,string chapterName, Guid bookId);

        public abstract IDictionary<string,string> GetChapterUrls(string url, string baseUrl);
        #endregion
    }

    
}
